try {
self.init(null);
- } catch(e) {
+ } catch (e) {
log('Failed to connect to Fprint service: ' + e.message);
return null;
}
try {
this._clearUserVerifier();
this._userVerifier = client.open_reauthentication_channel_finish(result);
- } catch(e) {
+ } catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
if (e.matches(Gio.DBusError, Gio.DBusError.ACCESS_DENIED) &&
try {
this._clearUserVerifier();
this._userVerifier = client.get_user_verifier_finish(result);
- } catch(e) {
+ } catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
this._reportInitError('Failed to obtain user verifier', e);
(obj, result) => {
try {
obj.call_begin_verification_for_user_finish(result);
- } catch(e) {
+ } catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
this._reportInitError('Failed to start verification for user', e);
(obj, result) => {
try {
obj.call_begin_verification_finish(result);
- } catch(e) {
+ } catch (e) {
if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
return;
this._reportInitError('Failed to start verification', e);
: ExtensionType.SYSTEM;
try {
extension = createExtensionObject(uuid, extensionDir, type);
- } catch(e) {
+ } catch (e) {
logError(e, 'Could not load extension %s'.format(uuid));
return;
}
try {
Gio.Subprocess.new(['ibus-daemon', '--xim', '--panel', 'disable'],
Gio.SubprocessFlags.NONE);
- } catch(e) {
+ } catch (e) {
log('Failed to launch ibus-daemon: ' + e.message);
}
}
engine = this._ibus.get_global_engine_async_finish(result);
if (!engine)
return;
- } catch(e) {
+ } catch (e) {
return;
}
this._engineChanged(this._ibus, engine.get_name());
let version = result.deep_unpack()[0].deep_unpack();
return haveSystemd() && versionCompare('3.5.91', version);
- } catch(e) {
+ } catch (e) {
return false;
}
}
let [outVariant, fdList] = proxy.call_with_unix_fd_list_finish(result);
fd = fdList.steal_fds()[0];
callback(new Gio.UnixInputStream({ fd: fd }));
- } catch(e) {
+ } catch (e) {
logError(e, "Error getting systemd inhibitor");
callback(null);
}
(initable, result) => {
try {
initable.init_finish(result);
- } catch(e) {
+ } catch (e) {
logError(e, 'could not initialize proxy for interface ' + interfaceName);
if (onFinished)
_onManagerProxyLoaded(initable, result) {
try {
initable.init_finish(result);
- } catch(e) {
+ } catch (e) {
logError(e, 'could not initialize object manager for object ' + this._serviceName);
this._tryToCompleteLoad();
let context = global.create_app_launch_context(0, -1);
app.launch([], context);
- } catch(err) {
+ } catch (err) {
_handleSpawnError(argv[0], err);
}
}
(o, res) => {
try {
this._gclueService = Geoclue.Simple.new_finish(res);
- } catch(e) {
+ } catch (e) {
log('Failed to connect to Geoclue2 service: ' + e.message);
this._setLocation(this._mostRecentLocation);
return;
try {
keyfile.load_from_data_dirs(path, GLib.KeyFileFlags.NONE);
name = keyfile.get_locale_string('Desktop Entry', 'Name', null);
- } catch(e) {
+ } catch (e) {
return name;
}
}
this._appInfoList = Shell.AppSystem.get_default().get_installed().filter(appInfo => {
try {
(appInfo.get_id()); // catch invalid file encodings
- } catch(e) {
+ } catch (e) {
return false;
}
return appInfo.should_show();
let dialog;
try {
dialog = new AudioDeviceSelectionDialog(devices);
- } catch(e) {
+ } catch (e) {
invocation.return_value(null);
return;
}
try {
this._dbusProxy.init_finish(result);
loaded = true;
- } catch(e) {
+ } catch (e) {
if (e.matches(Gio.DBusError, Gio.DBusError.TIMED_OUT)) {
// Ignore timeouts and install signals as normal, because with high
// probability the service will appear later on, and we will get a
this._vpnChildFinished.bind(this));
this._writeConnection();
- } catch(e) {
+ } catch (e) {
logError(e, 'error while spawning VPN auth helper');
this._agent.respond(requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR);
} else {
try {
this._stdin.write('QUIT\n\n', null);
- } catch(e) { /* ignore broken pipe errors */ }
+ } catch (e) { /* ignore broken pipe errors */ }
}
this.destroy();
if (line == '' && this._previousLine == '') {
try {
this._stdin.write('QUIT\n\n', null);
- } catch(e) { /* ignore broken pipe errors */ }
+ } catch (e) { /* ignore broken pipe errors */ }
} else {
this._agent.set_password(this._requestId, this._previousLine, line);
this._previousLine = undefined;
this._agent.set_password(this._requestId, groups[i], value);
}
}
- } catch(e) {
+ } catch (e) {
// No output is a valid case it means "both secrets are stored"
if (data.length > 0) {
logError(e, 'error while reading VPN plugin output keyfile');
this._stdin.write('SECRET_VAL=' + (value || '') + '\n\n', null);
});
this._stdin.write('DONE\n\n', null);
- } catch(e) {
+ } catch (e) {
logError(e, 'internal error while writing connection to helper');
this._agent.respond(this._requestId, Shell.NetworkAgentResponse.INTERNAL_ERROR);
try {
let monitor = this._pluginDir.monitor(Gio.FileMonitorFlags.NONE, null);
monitor.connect('changed', () => { this._vpnCacheBuilt = false; });
- } catch(e) {
+ } catch (e) {
log('Failed to create monitor for VPN plugin dir: ' + e.message);
}
try {
this._native.init_finish(res);
this._initialized = true;
- } catch(e) {
+ } catch (e) {
this._native = null;
logError(e, 'error initializing the NetworkManager Agent');
}
enable() {
try {
this._native.register();
- } catch(e) {
+ } catch (e) {
log('Failed to register AuthenticationAgent');
}
}
disable() {
try {
this._native.unregister();
- } catch(e) {
+ } catch (e) {
log('Failed to unregister AuthenticationAgent');
}
}
var Tp = null;
try {
({ TelepathyGLib: Tp, TelepathyLogger: Tpl } = imports.gi);
-} catch(e) {
+} catch (e) {
log('Telepathy is not available, chat integration will be disabled.');
}
let desktopFile;
try {
[desktopFile] = inhibitor.GetAppIdSync();
- } catch(e) {
+ } catch (e) {
// XXX -- sometimes JIT inhibitors generated by gnome-session
// get removed too soon. Don't fail in this case.
log('gnome-session gave us a dead inhibitor: %s'.format(inhibitor.get_object_path()));
try {
this._updatesPermission = Polkit.Permission.new_sync("org.freedesktop.packagekit.trigger-offline-update", null, null);
- } catch(e) {
+ } catch (e) {
log('No permission to trigger offline updates: %s'.format(e.toString()));
}
return base.replace(/\]$/, ' delegate for ' + this.actor.toString().substring(1));
else
return base;
- } catch(e) {
+ } catch (e) {
return base;
}
};
try {
extension = ExtensionUtils.createExtensionObject(uuid, extensionDir, ExtensionUtils.ExtensionType.PER_USER);
ExtensionSystem.loadExtension(extension);
- } catch(e) {
+ } catch (e) {
if (extension)
ExtensionSystem.unloadExtension(extension);
try {
let extension = ExtensionUtils.createExtensionObject(uuid, dir, ExtensionUtils.ExtensionType.PER_USER);
ExtensionSystem.loadExtension(extension);
- } catch(e) {
+ } catch (e) {
uninstallExtension(uuid);
errback('LoadExtensionError', e);
return;
let uuid = orderReversed[i];
try {
ExtensionUtils.extensions[uuid].stateObj.disable();
- } catch(e) {
+ } catch (e) {
logExtensionError(uuid, e);
}
}
try {
extension.stateObj.disable();
- } catch(e) {
+ } catch (e) {
logExtensionError(uuid, e);
}
let uuid = order[i];
try {
ExtensionUtils.extensions[uuid].stateObj.enable();
- } catch(e) {
+ } catch (e) {
logExtensionError(uuid, e);
}
}
extension.state = ExtensionState.ENABLED;
_signals.emit('extension-state-changed', extension);
return;
- } catch(e) {
+ } catch (e) {
if (extension.stylesheet) {
theme.unload_stylesheet(extension.stylesheet);
delete extension.stylesheet;
let newExtension;
try {
newExtension = ExtensionUtils.createExtensionObject(uuid, dir, type);
- } catch(e) {
+ } catch (e) {
logExtensionError(uuid, e);
return;
}
ExtensionUtils.installImporter(extension);
try {
extensionModule = extension.imports.extension;
- } catch(e) {
+ } catch (e) {
logExtensionError(uuid, e);
return false;
}
if (extensionModule.init) {
try {
extensionState = extensionModule.init(extension);
- } catch(e) {
+ } catch (e) {
logExtensionError(uuid, e);
return false;
}
let window = global.display.focus_window.get_compositor_private();
this._setDummyCursorGeometry(window.x + x, window.y + y, w, h);
});
- } catch(e) {
+ } catch (e) {
// Only recent IBus versions have support for this signal
// which is used for wayland clients. In order to work
// with older IBus versions we can silently ignore the
let extents;
try {
extents = component.get_extents(Atspi.CoordType.SCREEN);
- } catch(e) {
+ } catch (e) {
log('Failed to read extents of focused component: ' + e.message);
return;
}
let extents;
try {
extents = text.get_character_extents(text.get_caret_offset(), 0);
- } catch(e) {
+ } catch (e) {
log('Failed to read extents of text caret: ' + e.message);
return;
}
let source;
try {
source = this._ensureAppSource(appId);
- } catch(e) {
+ } catch (e) {
if (e instanceof InvalidAppError)
return;
throw e;
let source;
try {
source = this._ensureAppSource(appId);
- } catch(e) {
+ } catch (e) {
if (e instanceof InvalidAppError) {
invocation.return_dbus_error('org.gtk.Notifications.InvalidApp', 'The app by ID "%s" could not be found'.format(appId));
return;
try {
keyfile.load_from_file(path, 0);
- } catch(e) {
+ } catch (e) {
return;
}
let autoStart = true;
try {
autoStart = keyfile.get_boolean(group, 'AutoStart');
- } catch(e) {
+ } catch (e) {
// ignore error
}
remoteProvider.defaultEnabled = true;
try {
remoteProvider.defaultEnabled = !keyfile.get_boolean(group, 'DefaultDisabled');
- } catch(e) {
+ } catch (e) {
// ignore error
}
objectPaths[objectPath] = remoteProvider;
loadedProviders.push(remoteProvider);
- } catch(e) {
+ } catch (e) {
log('Failed to add search provider %s: %s'.format(path, e.toString()));
}
}
if (fileContent instanceof Uint8Array)
fileContent = imports.byteArray.toString(fileContent);
newMode = JSON.parse(fileContent);
- } catch(e) {
+ } catch (e) {
return;
}
let props;
try {
props = conn.call_finish(result).deep_unpack()[0];
- } catch(e) {
+ } catch (e) {
log('Could not get properties from ' + this._BUS_NAME);
return;
}
let state = client.check_connectivity_finish(result);
if (state >= NM.ConnectivityState.FULL)
this._closeConnectivityCheck(path);
- } catch(e) { }
+ } catch (e) { }
});
} else {
log('Invalid result from portal helper: ' + result);
_onProxyReady(o, res) {
try {
this._proxy = Gio.DBusProxy.new_finish(res);
- } catch(e) {
+ } catch (e) {
log('error creating bolt proxy: %s'.format(e.message));
return;
}